package com.jincheng.system.domain;

import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.jincheng.common.annotation.Excel;
import com.jincheng.common.core.domain.BaseEntity;
import lombok.Getter;
import lombok.Setter;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.io.Serial;
import java.util.Date;

/**
 * 活动管理对象 tb_activity
 *
 * @author DairyJay
 * @date 2024-12-19
 */
@Setter
@Getter
@TableName("tb_activity")
public class SysActivity extends BaseEntity {
    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 活动id
     */
    private Long activityId;

    /**
     * 活动名称
     */
    @Excel(name = "活动名称")
    private String activityName;

    /**
     * 组织者ID
     */
    @Excel(name = "组织者ID")
    private Long organizerId;

    /**
     * 开始时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "开始时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date startTime;

    /**
     * 结束时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "结束时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date endTime;

    /**
     * 活动地点
     */
    @Excel(name = "活动地点")
    private String location;

    /**
     * 活动描述
     */
    @Excel(name = "活动描述")
    private String description;

    /**
     * 活动图片
     */
    @Excel(name = "活动图片")
    private String imageUrl;

    /**
     * 逻辑删除
     */
    private Integer delFlag;

    /**
     * 类型id
     */
    @Excel(name = "类型id")
    private Long typeId;

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("activityId", getActivityId())
                .append("activityName", getActivityName())
                .append("organizerId", getOrganizerId())
                .append("startTime", getStartTime())
                .append("endTime", getEndTime())
                .append("location", getLocation())
                .append("description", getDescription())
                .append("imageUrl", getImageUrl())
                .append("deFlag", getDelFlag())
                .append("typeId", getTypeId())
                .toString();
    }
}
